package by.gravity.web.services;

import java.io.IOException;
import java.io.PrintWriter;
import java.sql.SQLException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class SpecialityServlet extends CommonServlet {
	private static final long serialVersionUID = 1L;

	public SpecialityServlet() {
		super();
	}

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		super.doGet(request, response);
		PrintWriter writer = response.getWriter();

		try {
			writer.print(getProvider().getSpeciality());
		} catch (InstantiationException | IllegalAccessException | ClassNotFoundException | SQLException e) {
			printExeption(writer, e);
		}

	}

}
